<script lang="ts" setup>
import { onLaunch, onShow } from '@dcloudio/uni-app';
onLaunch(() => {});
onShow(() => {
	const updateManager = wx.getUpdateManager();
	updateManager.onCheckForUpdate((res) => {
		if (res.hasUpdate) {
			updateManager.onUpdateReady(() => {
				wx.showModal({
					title: '更新提示',
					content: '新版本已经准备好，是否重启应用？',
					success: function (res) {
						if (res.confirm) {
							// 新的版本已经下载好，调用 applyUpdate 应用新版本并重启
							updateManager.applyUpdate();
						}
					}
				});
			});
		}
	});
});
</script>

<style>
button {
	background: initial;
}
button:focus {
	outline: 0;
}
button::after {
	border: none;
}
page {
	background: #f9f9f9;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}
.content {
	width: 100%;
	height: 100vh;
}
.l {
	float: left;
}
.r {
	float: right;
}
.h {
	overflow: hidden;
}
.pop {
	width: 100%;
	height: 100%;
	overflow: auto;
	position: fixed;
	top: 0;
	left: 0;
	background-color: rgba(0, 0, 0, 0.8);
	z-index: 2000;
}
.footer {
	width: 100%;
	height: 68rpx;
	position: fixed;
	bottom: 20rpx;
}

.bef {
	position: relative;
	padding-left: 12rpx;
	margin-left: 14rpx;
}
.bef::before {
	content: '';
	display: block;
	position: absolute;
	left: -6px;
	top: 50%;
	transform: translateY(-50%);
	width: 6rpx;
	height: 28rpx;
	background-color: red; /* 调整颜色为需要的颜色 */
}
</style>
